﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!-- Resource dictionary entries should be defined here. -->
	
	
	<SolidColorBrush x:Key="TabControlOuterBorder" Color="#121011"/>
	<SolidColorBrush x:Key="TabControlInnerBorder" Color="#5c5e5b"/>
	<SolidColorBrush x:Key="TabControlBackground" Color="#323230"/>
	
	<SolidColorBrush x:Key="TabControlOuterBorderDisabled" Color="#b8b8b8"/>
	<SolidColorBrush x:Key="TabControlInnerBorderDisabled" Color="#cfcfcf"/>
	<SolidColorBrush x:Key="TabControlDisabledBackground" Color="#b4b4b4"/>
	
	<Style TargetType="{x:Type TabControl}">
		<Setter Property="Foreground" Value="White"/>
		<Setter Property="Padding" Value="4,4,4,4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Background" Value="#F9F9F9"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
						<Grid.ColumnDefinitions>
							<ColumnDefinition x:Name="ColumnDefinition0"/>
							<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
							<RowDefinition x:Name="RowDefinition1" Height="*"/>
						</Grid.RowDefinitions>
						<TabPanel Margin="2,2,10,0" x:Name="HeaderPanel" Grid.Column="0" Grid.Row="0" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1"/>
						<Border x:Name="ContentPanel" Grid.Column="0" Grid.Row="1" BorderBrush="{StaticResource TabControlOuterBorder}" BorderThickness="1" CornerRadius="0,4,4,4">
							<Border x:Name="InnerBd" Background="{StaticResource TabControlBackground}" BorderBrush="{StaticResource TabControlInnerBorder}" BorderThickness="1" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" CornerRadius="0,3,3,3">
								<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
							</Border>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							<Setter Property="BorderBrush" TargetName="ContentPanel" Value="{StaticResource TabControlOuterBorderDisabled}"/>
							<Setter Property="BorderBrush" TargetName="InnerBd" Value="{StaticResource TabControlInnerBorderDisabled}"/>
							<Setter Property="Background" TargetName="InnerBd" Value="{StaticResource TabControlDisabledBackground}"/>
							<Setter Property="Foreground" Value="{StaticResource TabControlInnerBorderDisabled}"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
							<Setter Property="CornerRadius" TargetName="ContentPanel" Value="4,4,4,0"/>
							<Setter Property="CornerRadius" TargetName="InnerBd" Value="3,3,3,0"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Left">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Right">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
							<Setter Property="CornerRadius" TargetName="ContentPanel" Value="4,0,4,4"/>
							<Setter Property="CornerRadius" TargetName="InnerBd" Value="3,0,3,3"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>
